<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Order_no')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-order_no" data-rule="required" class="form-control" name="row[order_no]" type="text"
                value="{$row.order_no|htmlentities}" disabled>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-user_id" data-rule="required" min="0" data-source="user/user/index" data-field="nickname"
                class="form-control selectpage" name="row[user_id]" type="text" value="{$row.user_id|htmlentities}"
                disabled>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Custom_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-custom_id" data-rule="required" data-source="custom/index" class="form-control selectpage"
                name="row[custom_id]" type="text" value="{$row.custom_id|htmlentities}" disabled>
        </div>
    </div>
    <!-- {if ($row['send_type']==1&&$acct_id==0)||($row['send_type']==2&&$acct_id>0)||$row['status']==0}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="radio">
                {foreach name="statusList" item="vo"}
                <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio"
                        value="{$key}" {in name="key" value="$row.status" }checked{/in} {if
                            $row.status=='-1' ||
                            ($row.status=='0' && $key=='99' ) || 
                            ($row.status=='0.1' && $key=='0')||
                            (($row.status=='0.5'||$row.status=='1') && ($key=='0' ||$key=='-1'||$key=='0.1' ))||

                        ($row.status=='1' && ($key=='0' ||$key=='-1' )) || ($row.status=='99' && ($key=='1' ||$key=='0.1'||$key=='0.5' ||$key=='0'
                        ||$key=='-1' ))}disabled{/if} /> {$vo}</label>
                {/foreach}
            </div>
        </div>
    </div>
    {/if}

    {if $acct_id}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('发货平台')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="radio">
                <label for="row[send_type]-1"><input id="row[send_type]-1" name="row[send_type]" type="radio" {if
                        $row.status!='0' }disabled{/if} value="1" {in name="1" value="$row.send_type" }checked{/in} />
                    总平台</label>
                <label for="row[send_type]-2"><input id="row[send_type]-2" name="row[send_type]" type="radio" {if
                        $row.status!='0' }disabled{/if} value="2" {in name="2" value="$row.send_type" }checked{/in} />
                    子平台</label>
            </div>

        </div>
    </div>
    {/if} -->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('审核失败原因')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-msg" class="form-control" disabled name="row[msg]" type="text" value="{$row.msg|htmlentities}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Total')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-total" min="0" class="form-control" name="row[total]" type="number"
                value="{$row.total|htmlentities}" disabled>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('总重量')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-total" min="0" class="form-control" name="row[total_weight]" type="number"
                value="{$row.total_weight|htmlentities}" disabled>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('成本价')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-original_price" min="0" class="form-control" step="0.01" name="row[original_price]"
                type="number" value="{$row.original_price|htmlentities}" disabled>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Total_fee')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-total_fee" min="0" class="form-control" step="0.01" name="row[total_fee]" type="number"
                value="{$row.total_fee|htmlentities}" disabled>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Pay_fee')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-pay_fee" min="0" class="form-control" step="0.01" name="row[pay_fee]" type="number"
                value="{$row.pay_fee|htmlentities}" disabled>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('配送费')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-send_fee" min="0" class="form-control" step="0.01" name="row[send_fee]" type="number"
                value="{$row.send_fee|htmlentities}" disabled>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('差额总价')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input class="form-control" value="{$row.pay_fee-$row.total_fee|htmlentities}" disabled>
        </div>
    </div>


    <!-- <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Pay_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-pay_time" min="0" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[pay_time]" type="text" value="{:$row.pay_time?datetime($row.pay_time):''}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Finished_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-finished_time" min="0" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[finished_time]" type="text" value="{:$row.finished_time?datetime($row.finished_time):''}">
        </div>
    </div>-->

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('配送方式')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-remark" class="form-control" name="row[remark]" disabled type="text"
                value="{$row.distribution.title??''}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Remark')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-remark" class="form-control" name="row[remark]" disabled type="text"
                value="{$row.remark|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Consign_name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-consign_name" class="form-control" name="row[consign_name]" type="text"
                value="{$row.consign_name|htmlentities}" disabled>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Consign_mobile')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-consign_mobile" class="form-control" name="row[consign_mobile]" type="text"
                value="{$row.consign_mobile|htmlentities}" disabled>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Consign_address')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-consign_address" class="form-control" name="row[consign_address]" type="text"
                value="{$row.consign_address|htmlentities}" disabled>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Pay_image')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-pay_image" class="form-control" size="50" name="row[pay_image]" type="text"
                    value="{$row.pay_image|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-pay_image" class="btn btn-danger faupload"
                            data-input-id="c-pay_image"
                            data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp"
                            data-multiple="true" data-preview-id="p-pay_image"><i class="fa fa-upload"></i>
                            {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-pay_image" class="btn btn-primary fachoose"
                            data-input-id="c-pay_image" data-mimetype="image/*" data-multiple="true"><i
                                class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-pay_image"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-pay_image"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Express_com')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-express_id" data-rule="" data-source="category/selectpage" disabled
                class="form-control selectpage" data-params='{"custom[type]":"wl","custom[type]":"wl"}'
                name="row[express_id]" type="text" value="{$row.express_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Express_no')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-express_no" class="form-control" name="row[express_no]" disabled type="text"
                value="{$row.express_no|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('物流凭证')}:</label>
        <div class="col-xs-12 col-sm-8">
            {if ($row['send_type']==1&&$acct_id!=0)||($row['send_type']==2&&$acct_id==0)}
            <ul class="row list-inline faupload-preview" id="p-express_images" data-listidx="0">
                {php}
                $express_images=explode(',',$row['express_images']);
                {/php}
                {foreach name="express_images" item="vo" key="k"}
                <li class="col-xs-3">
                    <a href="{$vo}" data-url="{$vo}" target="_blank" class="thumbnail">
                        <img src="{$vo}" onerror="this.src='/kai.php/ajax/icon?suffix=png';this.onerror=null;"
                            class="img-responsive">
                    </a>
                </li>
                {/foreach}
            </ul>

            {else}
            <div class="input-group">
                <input id="c-express_images" class="form-control" size="50" name="row[express_images]" type="text"
                    value="{$row.express_images|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span>
                        <button type="button" id="faupload-express_images" class="btn btn-danger faupload"
                            data-input-id="c-express_images"
                            data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp"
                            data-multiple="true" data-preview-id="p-express_images"><i class="fa fa-upload"></i>
                            {:__('Upload')}</button>
                    </span>
                    <!-- <span><button type="button" id="fachoose-express_images" class="btn btn-primary fachoose"
                            data-input-id="c-express_images" data-mimetype="image/*" data-multiple="true"><i
                                class="fa fa-list"></i> {:__('Choose')}</button></span> -->
                </div>
                <span class="msg-box n-right" for="c-express_images"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-express_images"></ul>
            {/if}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">商品信息</label>
        <div class="col-xs-12 col-sm-8">
            {foreach name="$row->ordergoods" item="vo"}
            <div
                style="display: flex;padding:15px;justify-content:space-between;background-color: #f9f9f9;margin-top: 20px;border-radius: 12px;">
                <div>
                    <img style="width: 80px;height:80px;border-radius: 12px;" src="{$vo.goods_info_json['thumb_image']}"
                        alt="">
                </div>
                <div
                    style="font-size: 14px;padding: 0 20px 10px 10px;display: flex;flex-direction: column;justify-content: space-between;flex:1;">
                    <div style="display: -webkit-box;
                    -webkit-box-orient: vertical;
                    -webkit-line-clamp: 2;
                    overflow: hidden;font-weight: bold;">{$vo.goods_info_json['title']}
                        <!-- <span>*{$vo.total}{$vo.goods_info_json['unit']??'斤'}</span> -->
                    </div>
                    <div style="display: flex;color: #999;">
                        <div>规格：{$vo.goods_info_json['intro']}</div>
                    </div>
                    <div style="display: flex;color: #999;">
                        <div>数量：{$vo.total}</div>
                    </div>
                    <div style="display: flex;color: #999;">
                        <div>重量：{$vo.total_weight}{$vo.goods_info_json['unit']}</div>
                    </div>
                    <div style="display: flex;color: #999;">
                        <div>原价：{$vo.price}元</div>
                        <div style="margin-left: 20px;color: #FAA553;">修改单价：{$vo.pay_price}元</div>
                    </div>
                </div>
                <div style="font-size: 14px;color: #999;">
                    <div style="display: flex;">
                        <div style="width: 80px;">差额：</div>
                        <div style="color:#FE4B3D">{$vo.pay_price-$vo.price}元</div>
                    </div>
                    <div style="display: flex;">
                        <div style="width: 80px;">商品小计：</div>
                        <div>{$vo.pay_price*$vo.total}元</div>
                    </div>
                    <div style="display: flex;">
                        <div style="width: 80px;">差额小计：</div>
                        <div style="color:#FE4B3D">{$vo.pay_price*$vo.total-$vo.price*$vo.total}元</div>
                    </div>
                </div>
            </div>
            {/foreach}



            <label style="font-size: 28px;">{:__('差额总计')}:{$row.pay_fee-$row.total_fee|htmlentities}元</label>

        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <!-- <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button> -->
            <!-- <button type="close" class="btn btn-default btn-embossed">{:__('Close')}</button> -->
        </div>
    </div>
</form>